<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>项目申请</title>
    <link rel="stylesheet" href="__VENDOR__/css/head.css">
    <link rel="stylesheet" href="__VENDOR__/css/demand.css">
    <link rel="stylesheet" href="__VENDOR__/css/project.css">
    <script src="__VENDOR__/js/jquery-1.12.2.js"></script>
    <script type="text/javascript" src="__VENDOR_ADMIN__/lib/layer/2.4/layer.js"></script>
    <script type="text/javascript" src="__VENDOR_ADMIN__/lib/My97DatePicker/4.8/WdatePicker.js"></script>
    <script type="text/javascript" src="__VENDOR_ADMIN__/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
    <script type="text/javascript" src="__VENDOR_ADMIN__/static/h-ui/js/H-ui.min.js"></script>
    <script type="text/javascript" src="__VENDOR_ADMIN__/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
    <script type="text/javascript" src="__VENDOR_ADMIN__/lib/jquery.validation/1.14.0/validate-methods.js"></script>
    <script type="text/javascript" src="__VENDOR_ADMIN__/lib/jquery.validation/1.14.0/messages_zh.js"></script>
    <script src="__VENDOR__/js/button.js"></script>
	<link rel="stylesheet" href="/Public/Home/extend/css/head.css">
</head>
<body style="background: #f6f6f6">

<div class="head">
    <div class="head_div">
        <img style="float: left;display: block;margin-top: -10px" src="/Public/Home/extend/img/banner1.jpg" alt="">
        <div class="fl">
            <span>湖州交警支队在线审批</span>
            <span>http://www.hzjxj.com</span>
        </div>
        <div class="fr">
            <ul>
                <li><a href="/Home/Index/index.html">审批主页</a></li>
                <li><a href="/Home/Index/process.html">流程查询</a></li>
                <li><a href="/Home/Index/project.html" class="hover">项目申请</a></li>
                <li><a href="/Home/Index/apply_for.html">申请查询</a></li>
                <li><a href="/Home/Index/true_false.html">真伪查询</a></li>
            </ul>
        </div>
    </div>
</div>
<!--startprint-->
<style>
    .project_div1 div{
        margin-top: 60px;
    }
    .project_div div span:first-child{
        display: inline-block;
        width: 120px;
        text-align: right;
    }
    .project_div1 div span:first-child{
        display: inline-block;
        width: 120px;
        text-align: right;
    }
    .project_div2 div span:first-child{
        display: inline-block;
        width: 135px;
        text-align: right;
    }
    .project_div2 div{margin-top: 25px}
    .text1,.text{
        margin-bottom: 60px;
    }

</style>
<form class="form form-horizontal" id="form-add" enctype="multipart/form-data">
    <div class="project_content">
        <div class="demand_div">
            <div class="demand_div1">
                <img src="img/1.jpg" alt="">
                <span>项目申请提交成功，请保存好项目编号，以便查询申请进度</span>
            </div>
        </div>
        <div class="project_div">
            <div style="margin-left: 30px">
                <span>项目编号：</span>
                <span style="margin-left: 30px">{{$data['number']}}</span>
            </div>
            <div>
                <span>申请提交时间：</span>
                <span style="margin-left: 30px">{{:date("Y-m-d H:i:s",$data['apply_time'])}}</span>
            </div>
            <div >
                <span>项目申请选择：</span>
                <span style="margin-left: 30px">{{$data['project_name']}}</span>
            </div>

            <div >
                <span >附件：</span>
                <span>
                    <a title="点击下载" style="color: #063892;text-decoration: none;margin-left: 30px" href="{{:U('Home/Data/download',array('method'=>'apply','id'=>$data['id']))}}" >{{$data['number']}}.{{:pathinfo($data['path'])['extension']}}</a>
                </span>
            </div>
            <div class="check" >
                <span>材料寄送：</span>
                <switch name="data['is_deliver']">
                    <case value="1">
                        <lable style="margin-left: 30px;" >
                            <i class='input_style  radio_bg_check '><input type="radio" name="hot" value="2"></i>
                            是
                        </lable>
                    </case>
                    <case value="2">
                        <lable style="margin-left: 30px;">
                            <i class='input_style  radio_bg_check'><input type="radio"  checked="checked" name="hot" value="1"></i>
                            否
                        </lable>
                    </case>
                    <default/><span style="margin-left: 30px;color:red">异常选择</span>
                </switch>
            </div>
            <if condition="$data['is_deliver'] eq 1">
                <div class="text ">
                    <span>快递单号：</span>
                    <span style="margin-left: 30px">{{$data['tracking_no']}}</span>
                </div>
            </if>

        </div>
        <div class="project_div1">
            <div class="div1">主审单位</div>
            <div>
                <div>
                    <span>部门职务：</span>
                    <span style="margin-left: 30px">{{$data['depart_name']}}</span>
                </div>
                <div >
                    <span>联系人：</span>
                    <span style="margin-left: 30px">{{$data['contact']}}</span>
                </div>
                <div>
                    <span>电话号码：</span>
                    <span style="margin-left: 30px">{{$data['contact_phone']}}</span>
                </div>
                <div class="form">
                    <span style="margin-left: 0">邮寄地址：</span>
                    <span style='margin-left: 30px'>{{$data['contact_address']}}</span>

                </div>
            </div>
        </div>
        <div class="project_div2">
            <div class="check1 " >
                <span>现场勘测:</span>
                <switch name="data['need_survey']">
                    <case value="2">
                        <lable style="margin-left: 30px">
                            <i class='input_style  radio_bg_check'><input type="radio" name="hot2" value="1"></i>
                            不需要
                        </lable>
                    </case>
                    <case value="1">
                        <lable style="margin-left: 30px">
                            <i class='input_style  radio_bg_check'><input type="radio" name="hot2" value="2"></i>
                            需要
                        </lable>
                    </case>
                    <default/><span style="margin-left: 30px;color:red">异常选择</span>
                </switch>
            </div>
            <if condition="$data['need_survey'] eq 1">
                <div class="text1 ">
                <div>
                    <span>时间:</span>
                    <span style="margin-left: 30px">{{$data['survey_start_time']}}至{{$data['survey_end_time']}}</span>
                </div>
                <div class="form1" >
                    <span style="margin-left: 0">地点:</span>
                    <span style="margin-left: 30px">{{$data['survey_address']}}</span>

                </div>
                <div>
                    <span>联系人:</span>
                    <span style="margin-left: 30px">{{$data['survey_contact']}}</span>
                </div>
                <div>
                    <span>注意事项:</span>
                    <span style="margin-left: 30px">{{$data['survey_attention']}}</span>
                </div>
            </div>
            </if>
            <div class="check2">
                <span>审批表格是否寄送:</span>
                <switch name="data['need_deliver']">
                    <case value="2">
                        <lable style="margin-left: 30px">
                            <i class='input_style  radio_bg_check'><input type="radio" name="hot3" value="1"></i>
                            否
                        </lable>
                    </case>
                    <case value="1">
                        <lable style="margin-left: 30px">
                            <i class='input_style  radio_bg_check'><input type="radio" name="hot3" value="2"></i>
                            是
                        </lable>
                    </case>
                    <default/><span style="margin-left: 30px;color:red">异常选择</span>
                </switch>
            </div>
            <if condition="$data['need_deliver'] eq 1">
                <div class="text ">
                    <div >
                        <span>收件人:</span>
                        <span style="margin-left: 30px">{{$data['receiver_name']}}</span>
                    </div>
                    <div class="form2">
                        <span style="margin-left: 0">收件地址:</span>
                        <span style="margin-left: 30px">{{$data['receiver_address']}}</span>
                    </div>
                    <div>
                        <span>联系方式:</span>
                        <span style="margin-left: 30px">{{$data['receiver_phone']}}</span>
                    </div>
                </div>
            </if>
            <div >
                <span>申请人:</span>
                <span style="margin-left: 30px">{{$data['submitter']}}</span>
            </div>
            <div>
                <span>申请单位:</span>
                <span style="margin-left: 30px">{{$data['submitter_company']}}</span>
            </div>
            <div>
                <span>验证手机号:</span>
                <span style="margin-left: 30px">{{$data['validate_phone']}}</span>
            </div>
            <!--endprint-->
            <div style="width: 600px;padding-bottom: 30px">
                <button onclick="returnHome()" style="cursor: pointer">返回审核主页</button>
                <div style="margin-top:0;float: right;cursor: pointer;" title="点击下载" id="down">
                    <img src="__VENDOR__/img/print.jpg" alt="">
                    <span style="vertical-align: bottom;display: inline-block;color: #7d7d7d">下载申请页</span>
                </div>
            </div>

        </div>
    </div>
</form>

<form action="{{:U('Home/Index/do_print',array('id'=>$data['id']))}}" method="post" name="hld_res" id="hideform">
    <input type="hidden" id="hide_content" name="html"/>
</form>

</body>

<script type="text/javascript">
    function returnHome(){
        window.location.href="{{:U('Home/Index/index')}}";
    }

    $(function(){
        //表单验证
        $("#form-add").validate({
            rules: {
            },
            onkeyup: false,
            focusCleanup: true,
            success: "valid",
            submitHandler: function (form) {
                $(form).ajaxSubmit({
                    type: 'post',
                    url: "{{:U('Home/Ajax/ApplyAdd')}}",
                    beforeSend:function(){
                        $('#submit').hide();
                        $('#wait_img').show();
                    },
                    success: function (data) {
                        if (data.status) {
                            setTimeout((function () {
                                $('#wait_img').hide();
                                $('#submit').show();
                                layer.msg(data.info, {icon: 6, time: 1000});
//                                $("#form-add").reset();
//                                parent.window.location.href="{{:U('Admin/Department/DepartmentList')}}";
                            }), 1500);
                        } else {
                            $('#wait_img').hide();
                            $('#submit').show();
                            layer.msg(data.info, {icon: 2, time: 1000});
                        }
                    },
                    error: function (XmlHttpRequest, textStatus, errorThrown) {
                        layer.msg('error!', {icon: 5, time: 1000});
                    }
                });
            }
        });

        $("#down").click(function(){
            bdhtml=window.document.body.innerHTML;
            sprnstr="<!--startprint-->";
            eprnstr="<!--endprint-->";
            prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17);
            prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));
            //将获取的html代码添加到隐藏域中传给php文件处理
            $("#hide_content").val(""+prnhtml+"");
            $("#hideform").submit();
        });
    })

</script>


</html>